package tencent;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int n,m,ans=0,cnt_wen=0;
        Scanner scanner=new Scanner(System.in);
        n=scanner.nextInt();
        m=scanner.nextInt();
        String str;
        str=scanner.nextLine();
        char[] chars=str.toCharArray();
        for(int i=0;i<n-1;++i){
            if(chars[i]=='?'){
                cnt_wen++;
            }
            if(chars[i]!=chars[i+1]){
                ans++;
            }
        }
        System.out.println(ans);
    }
}
